<!DOCTYPE html>
<html lang="zh-cn" class="login">
<head>
  <meta charset="utf-8">
  <title>node的个人博客</title>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="description" content="Node个人博客第一版为了复习以前的知识写的">
  <meta name="keywords" content="Node复习。。。">
  <link rel='stylesheet' href='./stylesheets/normalize.css' />
  <link rel="stylesheet" href="./stylesheets/main.css"  />
</head>
<body>
<%- include("./public/header.ejs")%>

<section class="main flotfix">
  <%- include("./public/aside.ejs")%>

  <section class="main-articles">
    <ul>
      <% for (var i =0,max=articles.length;i<max;i++){ %>
      <li class="main-articles-item" >
        <h2>
          <a href="/article/<%=articles[i].articleID%>"><%= articles[i].articleTitle %></a>
        </h2>
        <section class="main-articles-item-des">
          <p>
            <span>作者: <%= articles[i].articleAuthor %></span>
            <span>发布时间: <%= articles[i].articleTime %></span>
            <span>浏览量: <%= articles[i].articleClick %></span>
            <%if(user){%>
              <span class="delete"><a href="/delete/<%= articles[i].articleID%>">删除</a> </span>

              <span class="modify"><a href="/modify/<%= articles[i].articleID%>">   &nbsp;   &nbsp;编辑</a> </span>

          </p>
          <%}%>
        </section>
      </li>
      <%}%>
    </ul>
    <%if (pageNum>1) { %>
    <section class="page">
      <% for (var i =1, max = pageNum; i<=max;i++){ %>
      <span <%if (i==page){ %>class = "active"<%}%>><a href="/index?page=<%=i%>"><%=i%></a> </span>
  <%}%>

    </section>

  </section>
  <%}%>
</section>
<%- include("./public/footer.ejs")%>

</body>
</html>
